]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Check error of g_dbus_proxy_new_sync call
authorMatthias Clasen <mclasen@redhat.com>
Thu, 24 Sep 2015 17:31:07 +0000 (13:31 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 24 Sep 2015 17:33:47 +0000 (13:33 -0400)
Otherwise errors pile up and we crash later on.

src/main.c

index b33d4bfdc83415532e5e894f5063de90ca5860e7..e8ac998cb1a800508628fae63cbe94a311bf35ec 100644 (file)
@@ -132,6 +132,12 @@ shell_dbus_init (gboolean replace)
                                NULL, /* cancellable */
                                &error);
 
+  if (!bus)
+    {
+      g_printerr ("Failed to get a session bus proxy: %s", error->message);
+      exit (1);
+    }
+
   request_name_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;
   if (replace)
     request_name_flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;